<h2 class="title2">
	<%= @download.title %>
	<em>发布时间：<%= @download.created_at.strftime("%Y-%m-%d") %></em>
</h2>
<%= render :partial => "share/share", :locals => {:title => @download.title } %>

<div class="article-content">
	&nbsp;&nbsp;&nbsp;&nbsp;
	<%= @download.content.bbcode_to_html if @download.content %>
</div>

<% if @download.need_login == 1 %>
<div class="list4">
	<table>
		<tr>
			<th width="50" align="center">&nbsp;</th>
			<th width="260" align="left">文件名称</th>
			<th width="120" align="left">文件大小</th>
			<th width="260" align="center">上传时间</th>
		</tr>
	 	<% @download.downfiles.each do |file| %>
			<tr>	
				<td><%= link_to(image_tag("download.gif"), "#{file.public_filename}", :title => "下载") %></td>
				<td><%= link_to file.name, "#{file.public_filename}", :title => "下载 #{file.name}" %></td>
				<td><%= file.size/1024/1024 %>M</td>
			  <td align="center"><%= file.created_at.strftime("%Y-%m-%d %H-%M-%S") %></td>
			</tr>
	 	<% end %>

	</table>
</div>
<% else %>
	登录后能看到资源
<% end %>